package com.iotechn.unimall.admin.api.purchasereturnorder;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.PurchaseOrderReturnDO;
import com.iotechn.unimall.data.model.Page;

import java.util.List;

/**
 * 后台退货/退库管理
 *
 * @author kyms
 * @date 2020-07-15 10:18
 */
@HttpOpenApi(group = "admin.purchaseReturnOrder", description = "后台退货/退库单管理")
public interface AdminPurchaseReturnOrderService {


    @HttpMethod(description = "列表")
    Page<PurchaseOrderReturnDO> page(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "20") Integer limit,
            @HttpParam(name = "search", description = "搜索") String search,
             @HttpParam(name = "skuSearch", description = "商品搜索") String skuSearch,
            @HttpParam(name = "storeOrderState", description = "状态") Integer storeOrderState,
            @HttpParam(name = "timeRange", description = "时间范围(逗号分隔，横线相连)") String timeRange,
            @HttpParam(name = "customerId", description = "客户id") Long customerId,
            @HttpParam(name = "customerType", description = "类型(1:供应商 2:门店)", valueDef = "2") Integer customerType,
            @HttpParam(name = "userId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long userId) throws ServiceException;


    @HttpMethod(description = "查询商品(带入库平均成本)")
    public Page pageSkusBySupplierIdWithPrice(@HttpParam(name = "pageNo", description = "页码", valueDef = "1") Integer page,
                                              @HttpParam(name = "limit", description = "页长度", valueDef = "20") Integer limit,
                                              @HttpParam(name = "categoryIds", description = "分类Id") String categoryIds,
                                              @HttpParam(name = "search") String search,
                                              @HttpParam(name = "supplierId", description = "供应商id") Long supplierId,
                                               @HttpParam(name = "warehouseId", description = "仓库id") Long warehouseId,
                                              @NotNull @HttpParam(name = "userId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long userId) throws ServiceException;


}
